<%-- 
    Document   : claim
    Created on : Nov 4, 2012, 9:10:17 AM
    Author     : msc
--%>

<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Claim</title>
        <%@include file="WEB-INF/template/userMeta.jspf" %>
        <%@include file="WEB-INF/template/userStyle.jspf" %>
        <%@include file="WEB-INF/template/userScript.jspf" %>
    </head>
    <body onload="showRequestResult()">
        <%
            HttpSession ss = request.getSession();
            String s = (String) ss.getAttribute("requestResult");
        %>
        <div class="main">
            <%@include file="WEB-INF/template/userHeader.jspf" %>
            <div class="content">
                <%@include file="WEB-INF/template/userHorizontalMenu.jspf" %>
                <div class="content_resize">
                    <%@include file="WEB-INF/template/userVerticalMenu.jspf" %>
                    <div class="mainbar">
                        <div class="article">
                            <h2><span>Claim</span></h2>
                            <div class="clr"></div>
                            <p>
                                Please fill in the information about all the reimbursement following the claim form below.
                            </p>
                        </div>
                        <div class="article">
                            <div class="clr"></div>
                            <div class="inner-content-employee">
                                <form name="claimForm" action="AddingClaim" method="post" onsubmit="return validateClaimForm();">
                                    <%
                                        if (s != null) {
                                    %>
                                    <input id="requestResult" name="requestResult" type="hidden" value="<%=s%>" />
                                    <%                                        }
                                    %>

                                    <%!                                        Date today = new Date();
                                        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                                    %>
                                    <div align="center"><h3>Claim Form</h3></div>
                                    <table id="table-claim-employee" width="630px">
                                        <tr>
                                            <td colspan="2"><span style="font-weight: bold;">Title</span></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2"><label>Set Date:</label> <%=formatter.format(today)%>
                                                <input type="hidden" name="setDate" id="setDate" value="<%=formatter.format(today)%>" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Request</td>
                                            <td>
                                                <input type="text" name="request" value="" size="50" onfocus="checkRequest(0)" onblur="checkRequest(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" height="22px"><span class="message-claim" id="requestMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2"><span style="font-weight: bold;">Information about the provider</span></td>
                                        </tr>
                                        <tr>
                                            <td>Name</td>
                                            <td>
                                                <input type="text" name="provider" value="" size="30" onfocus="checkProvider(0)" onblur="checkProvider(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" height="22"><span class="message-claim" id="providerMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td>Address</td>
                                            <td>
                                                <input type="text" name="address" value="" size="45" onfocus="checkAddress(0)" onblur="checkAddress(1)"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" height="22"><span class="message-claim" id="addressMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td>Phone Number</td>
                                            <td>
                                                <input type="text" name="phoneNumber" value="" size="15" onfocus="checkPhoneNumber(0)" onblur="checkPhoneNumber(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" height="22"><span class="message-claim" id="phoneNumberMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td>Email</td>
                                            <td>
                                                <input type="text" name="email" value="" size="30" onfocus="checkEmail(0)" onblur="checkEmail(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" height="22"><span class="message-claim" id="emailMessage"></span></td>
                                        </tr>
                                    </table>
                                    <table width="630px">
                                        <tr>
                                            <td colspan="2"><span style="font-weight: bold;">Reimbursement Details</span></td>
                                        </tr>
                                        <tr>
                                            <td width="280px">
                                                Date of Expense: 
                                                <input type="text" id="datepicker" name="expenseDate" onfocus="checkExpenseDate(0)" onblur="checkExpenseDate(1)" onchange="checkExpenseDate(1)" />
                                            </td>
                                            <td><span class="message-claim" id="expenseDateMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td valign="top">Medicine</td>
                                            <td valign="bottom">Cost of Medicine <span id="rs1"></span></td>
                                        </tr>
                                        <tr>
                                            <td rowspan="2" valign="top">
                                                <textarea id="medicine" name="medicine" rows="3" cols="30" onfocus="checkMedicine(0)" onblur="checkMedicine(1)"></textarea>
                                            </td>
                                            <td valign="top">
                                                <input id="costOfMedicine" type="text" name="costOfMedicine" value="" size="15" onfocus="checkCostOfMedicine(0)" onkeyup="checkCostOfMedicine(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="45px" valign="top"><span class="message-claim" id="costOfMedicineMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td height="22px" valign="top"><span class="message-claim" id="medicineMessage"></span></td>
                                            <td valign="top"></td>
                                        </tr>
                                        <tr>
                                            <td valign="top">Laboratory Test</td>
                                            <td valign="bottom">Cost of Laboratory Test <span id="rs2"></span></td>
                                        </tr>
                                        <tr>
                                            <td rowspan="2" valign="top">
                                                <textarea id="laboratoryTest" name="laboratoryTest" rows="3" cols="30" onfocus="checkLaboratoryTest(0)" onblur="checkLaboratoryTest(1)" ></textarea>
                                            </td>
                                            <td valign="top">
                                                <input id="costOfLaboratoryTest" type="text" name="costOfLaboratoryTest" value="" size="15" onfocus="checkCostOfLaboratoryTest(0)" onkeyup="checkCostOfLaboratoryTest(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="45px" valign="top"><span class="message-claim" id="costOfLaboratoryTestMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td height="22px" valign="top"><span class="message-claim" id="laboratoryTestMessage"></span></td>
                                            <td valign="top"></td>
                                        </tr>
                                        <tr>
                                            <td valign="top">Surgery</td>
                                            <td valign="bottom">Cost of Surgery <span id="rs3"></span></td>
                                        </tr>
                                        <tr>
                                            <td rowspan="2" valign="top">
                                                <textarea id="surgery" name="surgery" rows="3" cols="30" onfocus="checkSurgery(0)" onblur="checkSurgery(1)"></textarea>
                                            </td>
                                            <td valign="top">
                                                <input id="costOfSurgery" type="text" name="costOfSurgery" value="" size="15" onfocus="checkCostOfSurgery(0)" onkeyup="checkCostOfSurgery(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="45px" valign="top"><span class="message-claim" id="costOfSurgeryMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td height="22px" valign="top"><span class="message-claim" id="surgeryMessage"></span></td>
                                            <td valign="top"></td>
                                        </tr>
                                        <tr>
                                            <td valign="top">Other Items</td>
                                            <td valign="bottom">Cost of Other Items <span id="rs4"></span></td>
                                        </tr>
                                        <tr>
                                            <td rowspan="2" valign="top">
                                                <textarea id="otherItems" name="otherItems" rows="3" cols="30" onfocus="checkOtherItems(0)" onblur="checkOtherItems(1)"></textarea>
                                            </td>
                                            <td valign="top">
                                                <input id="costOfOtherItems" type="text" name="costOftherItems" value="" size="15" onfocus="checkCostOfOtherItems(0)" onkeyup="checkCostOfOtherItems(1)" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="45px" valign="top"><span class="message-claim" id="costOfOtherItemsMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td height="22px" valign="top"><span class="message-claim" id="otherItemsMessage"></span></td>
                                            <td valign="top"></td>
                                        </tr>
                                        <tr>
                                            <td> </td>
                                            <td valign="bottom">Total Cost: $ <span id="totalOfCost"></span></td>
                                        </tr>
                                        <tr>
                                            <td valign="top"><span class="message-claim" id="itemTypesMessage"></span></td>
                                            <td valign="top"><span class="message-claim" id="fillingCostMessage"></span></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" align="left">Extra information: <span id="test"></span></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <textarea id="note" name="note" rows="5" cols="60"></textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" align="center">
                                                <input type="submit" name="submit" value="Submit" />
                                                <input type="reset" name="reset" value="Reset" onclick="clearTotalCost()" />
                                            </td>
                                        </tr>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                    <div class="clr"></div>
                </div>
            </div>
            <%-- <%@include file="WEB-INF/template/userFooterBar.jspf" %> --%>
            <%@include file="WEB-INF/template/userFooter.jspf" %>
        </div>
    </body>
</html>
